import request from '../../utils/request';

//获取菜单-资源权限树
export const doFindMenuResource = paramData => {
    return request({
        url: '/api/resic/menu/findMenuResource',
        method: 'post',
        headers:{'Content-Type':'application/json'},
        data: paramData
    });
};

//查询菜单信息列表
export const doFindMenus = queryData => {
    return request({
        url: '/api/resic/menu/findByApp',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'queryData'},
        buildType : 'queryData',
        data: queryData
    });
};

//保存菜单信息
export const doSaveMenu = formData => {
    return request({
        url: '/api/resic/menu/save',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: formData
    });
};

//获取菜单信息
export const doGetMenu = queryData => {
    return request({
        url: '/api/resic/menu/get',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'queryData'},
        buildType : 'queryData',
        data: queryData
    });
};

//删除菜单信息
export const doDeleteMenu = paramData => {
    return request({
        url: '/api/resic/menu/delete',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
};